(defmacro defined [& var]
    `(try 
        (or 
            (boolean (resolve ~@var)) 
            (not (nil? (eval ~@var)))
        ) (catch Exception e# false)
    )
)

(println "getShort")
(if (defined 'getShort)
	(throw (Exception. "getShort already defined!"))
)
(def getShort (callback "getShort"))
(def getShortType (class getShort))
(println getShortType)
(println getShort)
(if-not (= getShortType Short)
	(throw (Exception. "getShort not Short!"))
)
(callback "setShort" getShort)

(println "getShortVector")
(if (defined 'getShortVector)
	(throw (Exception. "getShortVector already defined!"))
)
(def getShortVector (callback "getShortVector"))
(def getShortVectorType (class (get getShortVector 0)))
(println getShortVectorType)
(println getShortVector)
(if-not (= getShortVectorType Short)
	(throw (Exception. "getShortVector not Short!"))
)
(callback "setShortVector" getShortVector)

(println "getShortVectorAsList")
(if (defined 'getShortVectorAsList)
	(throw (Exception. "getShortVectorAsList already defined!"))
)
(def getShortVectorAsList (callback "getShortVectorAsList"))
(def getShortVectorAsListType (class (get getShortVectorAsList 0)))
(println getShortVectorAsListType)
(println getShortVectorAsList)
(if-not (= getShortVectorAsListType Short)
	(throw (Exception. "getShortVectorAsList not Short!"))
)
(callback "setShortVectorAsList" getShortVectorAsList)

(println "getShortMatrix")
(if (defined 'getShortMatrix)
	(throw (Exception. "getShortMatrix already defined!"))
)
(def getShortMatrix (callback "getShortMatrix"))
(def getShortMatrixType (class (get (get getShortMatrix 0) 0)))
(println getShortMatrixType)
(println getShortMatrix)
(if-not (= getShortMatrixType Short)
	(throw (Exception. "getShortMatrix not Short!"))
)
(callback "setShortMatrix" getShortMatrix)

(println "getShortMatrixAsList")
(if (defined 'getShortMatrixAsList)
	(throw (Exception. "getShortMatrixAsList already defined!"))
)
(def getShortMatrixAsList (callback "getShortMatrixAsList"))
(def getShortMatrixAsListType (class (get (get getShortMatrixAsList 0) 0)))
(println getShortMatrixAsListType)
(println getShortMatrixAsList)
(if-not (= getShortMatrixAsListType Short)
	(throw (Exception. "getShortMatrixAsList not Short!"))
)
(callback "setShortMatrixAsList" getShortMatrixAsList)
